<h2>Touch screen calibration 触控萤幕校正</h2>
<br>

<div id="main" style="width: 50%">
  <div>
    <span class="goofy-label-en">Serial number</span>
    <span class="goofy-label-zh">面板序号</span>
    <input id="sn" type="text" autofocus onkeydown="snEntered(event)">
  </div>
  <div id='display-area'>Display Area</div>
</div>

<div id="debug-panel" style="z-index: 10; position: absolute; right: 30;
    top: 30; border-style: solid; border-color: #555;">
  <button onClick="test.sendTestEvent('DriveProbeDown', {})">
    <span class="goofy-label-en">Probe goes down</span>
    <span class="goofy-label-zh">关机前治具下位停俥</span>
  </button>
  <br>

  <button onClick="test.sendTestEvent('DriveProbeUp', {})">
    <span class="goofy-label-en">Probe goes up</span>
    <span class="goofy-label-zh">测试前治具上位预备</span>
  </button>
  <br><br>

  <button onClick="test.sendTestEvent('ReadTest', {})">
    <span class="goofy-label-en">Read sensor data</span>
    <span class="goofy-label-zh">手动读取待测资料</span>
  </button>
  <br>

  <button onClick="test.sendTestEvent('ProbeSelfTest')">
    <span class="goofy-label-en">Probe self test</span>
    <span class="goofy-label-zh">手动治具自我测试</span>
  </button>

  <div>
    <div>
      <span class="goofy-label-en">Controller status</span>
      <span class="goofy-label-zh">治具连结</span>
      <div id="controller-status" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('RefreshFixture', {})">
        <span class="goofy-label-en">Refresh</span>
        <span class="goofy-label-zh">刷新</span>
      </button>
    </div>

    <div>
      <span class="goofy-label-en">Touchscreen status</span>
      <span class="goofy-label-zh">待测物连结</span>
      <div id="touchscreen-status" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('RefreshTouchscreen', {})">
        <span class="goofy-label-en">Refresh</span>
        <span class="goofy-label-zh">刷新</span>
      </button>
    </div>

    <div>
      <span class="goofy-label-en">Probe state</span>
      <span class="goofy-label-zh">治具内部状态</span>
      <div id="probe-state" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('QueryFixtureState', {})">
        <span class="goofy-label-en">FixtureState</span>
        <span class="goofy-label-zh">治具状态查询</span>
      </button>
    </div>

    <div>
      <span class="goofy-label-en">Host IP</span>
      <span class="goofy-label-zh">本机网址</span>
      <div id="host-network-status" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('RefreshNetwork', {})">
        <span class="goofy-label-en">Refresh</span>
        <span class="goofy-label-zh">刷新</span>
      </button>
    </div>

    <div>
      <span class="goofy-label-en">BB IP</span>
      <span class="goofy-label-zh">BB网址</span>
      <div id="bb-network-status" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('RefreshNetwork', {})">
        <span class="goofy-label-en">Refresh</span>
        <span class="goofy-label-zh">刷新</span>
      </button>
    </div>

    <div>
      <span class="goofy-label-en">Shopfloor IP</span>
      <span class="goofy-label-zh">Shopfloor网址</span>
      <div id="shopfloor-network-status" style="display:inline">N/A</div>
      <button onClick="test.sendTestEvent('RefreshNetwork', {})">
        <span class="goofy-label-en">Refresh</span>
        <span class="goofy-label-zh">刷新</span>
      </button>
    </div>

  </div>

  <br> <br> <br>
  <button onClick="test.sendTestEvent('ShutDown', {})">
    <span class="goofy-label-en">Shutdown the host</span>
    <span class="goofy-label-zh">关机</span>
  </button>
</div>
